<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
        *{
            box-sizing: initial;
            margin: 0;
            padding: 0;
        }
        ul,li{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        input:focus {
            outline: 0;
        }
        html,body{
            background: #f4e3db;
        }
        .code{
            vertical-align: middle;
            height: 28px;
            z-index: 999;
            position: absolute;
            right: 0px;
            top: 7px;
        }
        .top{
            width: 100%;
            background: url(/static/images/Bg.jpg) repeat-x;
            text-align: right;
            padding: 0;
            margin-bottom: -4px;
        }
        .boxBg{
            border-bottom: 1px solid #d0d0d0;
            background: #fff;
        }
        .formlist>li{
            width: 94%;
            padding: 0px 3%;
            border-bottom: 1px solid #d0d0d0;
            position: relative;
        }
        .formlist>li>span{
            width: 12%;
            display: inline-block;
            vertical-align: top;
        }
        .formlist>li>input{
            width: 88%;
            border: none;
            line-height: 22px;
            font-size: 18px;
            padding-top: 9px;
            text-align: left;
            margin-top: 3px;
            color: #919191;
            background: none;   
        }
        .formlist>li>input::-webkit-input-placeholder{
            color:#919191;
        }
        .formlist>li>input::-moz-placeholder{   /* Mozilla Firefox 19+ */
            color:#919191;
        }
        .formlist>li>input:-moz-placeholder{    /* Mozilla Firefox 4 to 18 */
            color:#919191;
        }
        .formlist>li>input:-ms-input-placeholder{  /* Internet Explorer 10-11 */ 
            color:#919191;
        }
        .username, .passwork, .number {
            width: 40px;
            height: 40px;
            background: url(/static/images/icon.png) no-repeat;
            background-size: cover;
        }
        .username {
            background-position: 0 0;
        }
        .passwork {
            background-position: 0 -40px;
        }
        .number {
            background-position: 0 -82px;
        }
        .bottom{
            width: 90%;
            margin: 30px auto 0px;
        }
        .bottom>input[type="submit"]{
            width: 100%;
            background: #f4e3db;
            height: 40px;
            border-radius: 20px;
            -webkit-border-radius: 20px;
            -moz-border-radius: 20px;
            border: none;
            line-height: 40px;
            text-align: center;
            color: #fff;
            font-size: 18px;
            font-weight: bold;
            -moz-box-shadow: 1px 2px 2px 0px #866460;
            -webkit-box-shadow: 1px 2px 2px 0px #866460;
            box-shadow: 1px 2px 2px 0px #866460;
        }
    </style>
</head>
<body>
    <div>
        <div class="box">
            <form method="post" enctype="application/x-www-form-urlencoded">
                <div class="top"><img src="/static/images/TopPic.jpg" width="100%" /></div>
                <div class="boxBg">
                    <ul class="formlist clearfix">
                        <li><span class="username"></span><input type="text" class="inp" name="name" tabindex="1" id="account" placeholder="请输入您的用户名" /></li>
                        <li><span class="passwork"></span><input type="password" class="inp" name="password" tabindex="2"  id="passwords" placeholder="请输入您的密码" /></li>
                        <li><span class="number"></span><input type="text" class="inp" id="code" name="code" maxlength="4" tabindex="3" placeholder="请输入验证码" /><img class="code" alt="验证码" title="图片看不清？点击重新得到验证码" id="codeImg" onclick="this.src='/code?'+Math.random()" /></li>
                    </ul>
                </div>
                <div class="bottom">
                    <input type="submit" class="btn" value="登录" />
                </div>
            </form>
        </div>
    </div>
    <script>

        window.localStorage.clear();
        function test() {
            location.href = location.href.replace('/login', '/test');
        }

        function register() {
            location.href = location.href.replace('/login', '/register');
        }
        //动态验证码
        function code() {
            var codeImg = document.getElementById('codeImg'), m = Math.random();
            codeImg.src = '/code?' + m;
        }
        window.onload = function () {
            code();
        }

    </script>
</body>
</html>